Additional considerations with load balancing Turnkey and MDrivenServer

Load Balancing the Turnkey Server

Use sticky-session to make sure the user returns to the same node during the session.

If you need to signal the LoadBalancer, we suggest that you model a page and make it RestAllow=true. Give the URL to your load balancer and return the data you have agreed upon. For example, you may want to return Active, or InActive in order to implement some application setting to move traffic away from a node you will work on.

In some examples, we have a page named AreYouOkCheck and then LoadBalancer can check if 200Ok is returned from the URL: https://APP/App#/AreYouOkCheck/$null$

Load Balancing the MDrivenServer

Use Fail-over in the Load Balancer. Only one MDrivenServer should be used at a time, but you can have hot standbys.

Since the Load Balancer must know which of the multiple MDrivenServers is a candidate for being the hot one - and also remember which one is hot - you can give the Load Balancer the URL: https://<yourserver>/home/ReturnNodeNameIfOk

You then set the unique names of the nodes in the UserAndRolesAdmin page in MDrivenServer.

It is important that the hot standbys do not execute ServerSide-jobs, since these should only be on One server.

2022-10-11 14h01 51.png

1: Make sure the Server name is set - you want it to be unique per node in the load balance group.

2: If the "Check Load balancer before running jobs" is not checked, everything works as normal and periodic actions will always run (if the app is Started).

3: If you set a URL in Load Balanced MDrivenServerUrl, you will - prior to running PeriodicActions - check that what you get back from <LoadBalancedAdress>/home/ReturnNodeNameIfOk - and if the returned value is ==TheNameOfThisServer, you will know that you have the hot-one; if not, you don't have the hot one.

4: The last known result from the Load balance check will be written to LoadBalancerStatus.

5: If we append the string "THIS NODE HAS REQUESTED TO BE LEFT ALONE" to the return name from /home/ReturnNodeNameIfOk - then the names will not match and we will not run periodic actions.

We changed the logic to a HideFromLoadBalancerUntil - being a DateTime in the future - if in the future we return a 500 error that the Load Balancers will interpret as an error. We will return this error until the timestamp has been passed - then the node becomes online again. This change will enable you to reach servers that may not be reachable from any other address that the load balanced

2022-10-25 15h35 46.png
2022-10-25 15h36 53.png
This page was edited 83 days ago on 08/26/2024. What links here